using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Runtime.Serialization;

namespace TemplateWeb.DTO
{
	/// <summary>
	/// Data transfer object which is associated with ToChucCaNhan table in database
	/// </summary>
	public class ToChucCaNhanDTO
	{
		public int ID { get; set; }
		public string TenToChucCaNhan { get; set; }
		public string DiaChi { get; set; }
		public string SoDienThoai { get; set; }

		public static ToChucCaNhanDTO Translate(DataRow row)
		{
			var dto = new ToChucCaNhanDTO
			{
				ID = int.Parse(row["ID"].ToString()),
				TenToChucCaNhan = row["TenToChucCaNhan"].ToString(),
				DiaChi = row["DiaChi"].ToString(),
				SoDienThoai = row["SoDienThoai"].ToString(),
			};
			return dto;
		}
	}
}